import request from '@/utils/request';

export async function getActivitylist(data) {
  const res = await request.post(
    '/business/activitylist/getActivitylist',
    data
  );
  if (res.data.code === 2000) {
    return res.data;
  }
  // console.log(res)
  // return res
  return Promise.reject(new Error(res));
}

// 生成二维码
export async function generateDoupayQrCode(params) {
  const res = await request.get('/business/activitylist/generateDoupayQrCode', {
    params
  });
  if (res.data.code === 2000) {
    return res.data;
  }
  // console.log(res)
  // return res
  return Promise.reject(new Error(res));
}
